package mmc.server.shell.ops.utility;

import mmc.server.Server;
import mmc.server.shell.ShellException;
import mmc.server.shell.ops.Function;

public class SetBlock extends Function {

    public SetBlock(String text) throws ShellException {
        super(text, "setblock", 4, false);
    }

	@Override
    public double execute() {
    	Server.instance.getScene().getCellManager().debug_setBlock(
    			(int)arguments.getCalculatedArgument(0), 
    			(int)arguments.getCalculatedArgument(1),
    			(int)arguments.getCalculatedArgument(2), 
    			(byte)arguments.getCalculatedArgument(3));
    	
        return 0;
    }
    
    public static String getDescription(){
    	return formatHelpString("setBlock(x,y,z,id)","modifies a block");
    }

}
